<script setup lang="ts">
import { useRouter } from "vue-router";

const router = useRouter();

function goHome() {
  router.push("/");
}
</script>

<template>
  <div class="not-found-view">
    <div class="not-found-content">
      <div class="not-found-icon">404</div>
      <h1 class="not-found-title">页面未找到</h1>
      <p class="not-found-message">抱歉，您访问的页面不存在或已被移除。</p>
      <button class="back-home-button" @click="goHome">返回首页</button>
    </div>
  </div>
</template>

<style scoped>
.not-found-view {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 60vh;
}

.not-found-content {
  text-align: center;
  max-width: 32rem;
  padding: 2rem;
}

.not-found-icon {
  font-size: 6rem;
  font-weight: 700;
  color: #d1d5db;
  margin-bottom: 1.5rem;
  line-height: 1;
}

.not-found-title {
  font-size: 1.875rem;
  font-weight: 600;
  color: #111827;
  margin-bottom: 1rem;
}

.not-found-message {
  font-size: 1.125rem;
  color: #6b7280;
  margin-bottom: 2rem;
}

.back-home-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  background-color: #2563eb;
  color: white;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: background-color 0.2s;
  border: none;
  cursor: pointer;
}

.back-home-button:hover {
  background-color: #1d4ed8;
}
</style>
